package com.lengxf.design;

/**
 * 具体策略类角色
 * By Lengxf
 */
public class ChildrenDiscount implements Discount {

    private final double DISCOUNT = 10;


    @Override
    public double calculate(double price) {
        System.out.println("儿童票...");
        if (price >= 20) {
            return price - DISCOUNT;
        }
        return price;
    }

}
